package com.zhaopin.controller;

import com.zhaopin.bean.MyRandom;
import com.zhaopin.bean.Person;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class PropertiesController {

    @Value("${person.name}")
    private String tmpStr;

    @Value("${person.name1}")
    private String tmpStr1;

    @Autowired
    private MyRandom myRandom;

    @Autowired
    private Person person;

    @RequestMapping("/pro")
    @ResponseBody
    public String pro(){
        System.out.println(tmpStr);
        System.out.println(tmpStr1);
        System.out.println(myRandom);
        return person.toString();
    }
}
